function Find1(target, array) {
//   write code here
  var l = array.length;
  var r = array[0].length; //l行 r列
//   console.log(flag);
let row = l-1
let col = 0 //当前在左下角
console.log(111);


while(row >= 0 && col <= r - 1)
{
    if(array[row][col] > target)
    {
      row--;
    }else 
    if(array[row][col] < target){
      col++;
    }else return  true
}
return false
}


console.log(Find1(111, [
    [1, 2, 8, 9],
    [2, 4, 9, 12],
    [4, 7, 10, 13],
    [6, 8, 11, 15],
  ]));
 ;
